{extend name="default/template/base_index" /}


{block name="area_header"}
<link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
<script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
{/block}

{block name="area_body"}
{include file="default/Widget/topbar" /}
<div class="admin-main container-fluid">
    {include file="default/Widget/left" /}
    <div class="admin-main-content">
        {include file="default/Widget/breadcrumb" /}
        <div class="table-responsive well">
            <div class="h4">
                接口调用耗时概述
            </div>
            <div class="form-control-static">
                <form action="{:url('ApiHistory/index')}" method="post" class="form-inline">
                    <div class="form-group">
                        <div class="input-group">
                            <!--<input type="text" name="api_name"   class="form-control" value="{present name='api_name'}{$api_name}{/present}" />-->
                        </div>
                    </div>
                    <!--<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>-->
                </form>
            </div>
            <div class="form-control-static">
                <!--<a href="{:url('ApiHistory/bulkDelete')}" class="confirm ajax-post btn btn-danger btn-sm" target-form="selectitem">{:L('BTN_SELECTED_DELETE')}</a>-->
            </div>
            <table class="table table-striped table table-hover  table-condensed">
                <thead>
                <tr>
                    <th>
                        接口
                    </th>
                    <th>
                        调用次数
                    </th>
                    <th>平均网络耗时(秒)
                    </th>
                    <th>最长网络耗时(秒)
                    </th>
                    <th>最短网络耗时(秒)
                    </th>
                    <th>
                        平均耗时
                    </th>
                    <th>
                        最长耗时
                    </th>
                    <th>
                        最短耗时
                    </th>
                </tr>
                </thead>
                <tbody>
                {empty name="list"}
                <tr>
                    <td colspan="7" class="text-center">{:L('NO_DATA')}</td>
                </tr>
                {/empty}
                {volist name="list" id="vo"}
                <tr>
                    <td>{$vo.api_uri}</td>
                    <td>{$vo.api_cnt}</td>
                    <td>{:sprintf("%.4f", $vo.avg_req_time)}</td>
                    <td>{:sprintf("%.4f", $vo.max_req_time)}</td>
                    <td>{:sprintf("%.4f", $vo.min_req_time)}</td>
                    <td>{:sprintf("%.4f", $vo.avg_cost_time)}</td>
                    <td>{:sprintf("%.4f", $vo.max_cost_time)}</td>
                    <td>{:sprintf("%.4f", $vo.min_cost_time)}</td>
                </tr>

                {/volist}
                </tbody>
            </table>
            <div>
                {$show}
            </div>
        </div>

    </div>
</div>
{/block}

{block name="area_footer"}
<script type="text/javascript">
    $(function() {
        $('#startdatetime').datetimepicker({
            lang: 'ch'
        });
        $('#enddatetime').datetimepicker({
            lang: 'ch'
        });
    })
</script>
{/block}